package cn.exrick.xboot.base.dto

import cn.exrick.xboot.core.common.constant.CommonConstant
import cn.exrick.xboot.core.common.utils.NameUtil
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import lombok.Data
import lombok.experimental.Accessors
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size

@Data
@Accessors(chain = true)
@ApiModel("监管部门入参实体类")
data class SupervisionUserDto (

    var id: String? = null,

    /*---------------用户基本资料----------------*/
    @ApiModelProperty(value = "用户名/昵称/姓名")
    var nickname: @NotNull(message = "不能为空") @Size(max = 20, message = "昵称长度不能超过20") String? = null,

    @ApiModelProperty(value = "用户头像")
    var avatar: String? = null,

    @ApiModelProperty(value = "密码")
    var password: String? = null,

    @ApiModelProperty(value = "手机:搜索条件")
    var mobile: @Pattern(regexp = NameUtil.regMobile, message = "11位手机号格式不正确") String? = null,

    @ApiModelProperty(value = "邮箱")
    var email: @Pattern(regexp = NameUtil.regEmail, message = "邮箱格式不正确") String? = null,

    @ApiModelProperty(value = "区域id:搜索条件")
    var areaId: String? = null,

    @ApiModelProperty(value = "性别")
    var sex: String? = null,

    @ApiModelProperty(value = "用户类型 0普通用户 1管理员")
    var type: Int = CommonConstant.USER_TYPE_NORMAL,

    @ApiModelProperty("角色id集合", hidden = true)
    var roleIds: String? = null,

    /*-----------------监管部门信息----------------*/
    @ApiModelProperty("所属科室:搜索条件")
    var officeId: String? = null,

    @ApiModelProperty("等级")
    var userLevel: Int? = null,

    @ApiModelProperty("单位代码")
    var dutyCode: String? = null,

    @ApiModelProperty("所属职务")
    var dutyName: String? = null,

    @ApiModelProperty("行业id")
    var businessId: String? = null,

    @ApiModelProperty("职务id")
    var dutyId: String? = null,

    @ApiModelProperty("是否是政府部门用户:默认不是 传true 为是")
    var departmentAccount: Boolean? = false

)